package com.deer.wms.base.system.service.impl;

import com.deer.wms.base.system.dao.AreaInfoMapper;
import com.deer.wms.base.system.model.Area.AreaInfo;
import com.deer.wms.base.system.model.Area.AreaInfoCriteria;
import com.deer.wms.base.system.model.Area.AreaInfoDto;
import com.deer.wms.base.system.service.AreaInfoService;
import com.deer.wms.project.root.service.SuperServiceImpl;
import com.deer.wms.system.manage.model.ValidatorAreaInfoModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by guo on 2019/11/21.
 */
@Service
@Transactional
public class AreaInfoServiceImpl extends SuperServiceImpl<AreaInfoMapper, AreaInfo> implements AreaInfoService {

    @Autowired
    private AreaInfoMapper areaInfoMapper;

    @Override
    public List<AreaInfoDto> findList(AreaInfoCriteria criteria) {
        return areaInfoMapper.findList(criteria);
    }

    @Override
    public List<AreaInfoDto> findByCode(String areaCode) {
        return areaInfoMapper.findByCode(areaCode);
    }

    @Override
    public List<AreaInfoDto> findByName(String areaName) {
        return areaInfoMapper.findByName(areaName);
    }

    @Override
    public int validatorChongfu(ValidatorAreaInfoModel model) {
        return areaInfoMapper.validatorChongfu(model);
    }
}
